<div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
    <table>
        <tbody>
        <volist name="orderStateList" id="list">
            <tr data-id="{$list['id']}" style="background-color: {$list.step|getOneColor=$list.create_time}">
                <td class="sign">
                    <div style="width: 24px;"><i class="ico-check"></i></div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 40px;">{$list.id}</div>
                </td>



                <td align="left" class="">
                    <div style="text-align: center; width: 150px;">{$list.step|getJinDuName}</div>
                </td>

                <td align="left" class="">
                    <div style="text-align: center; width: 150px;">{$list.woman_name}/{$list.man_name}</div>
                </td>


                <td align="left" class="">
                    <div style="text-align: center; width: 150px;">{$list.woman_phone}</div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 150px;">{$list.man_phone}</div>
                </td>

                <td align="left" class="">
                    <div style="text-align: center; width: 80px;">{$list.married_date}

                    </div>
                </td>

                <td align="left" class="">
                    <div style="text-align: center; width: 120px;">{$list.married_money}</div>
                </td>
                <td align="left" class="">
                    <div style="text-align: center; width: 120px;">
                        {$list.order}
                    </div>
                </td>

                <td align="left" class="">
                    <div style="text-align: center; width: 120px;">
                        {$comboList[$list.combo]}
                    </div>
                </td>



                <td align="left" class="">
                    <div style="text-align: center; width: 120px;">
                        {$list.counselor_id|getUserName}
                    </div>
                </td>

                <td align="center" class="handle">
                    <div style="text-align: center; width: 170px; max-width:250px;">
                        <a class="btn blue" href="{:U('Admin/married/married_order',array('id'=>$list['id']))}"><i class="fa fa-pencil-square-o"></i>详情</a>
                    </div>
                </td>
                <td align="" class="" style="width: 100%;">
                    <div>&nbsp;</div>
                </td>
            </tr>
        </volist>
        </tbody>
    </table>
</div>
<!--分页位置-->
{$page}
<script>
    $(".pagination  a").click(function(){
        var page = $(this).data('p');
        ajax_get_table('search-form2',page);
    });
    $(document).ready(function(){
        // 表格行点击选中切换
        $('#flexigrid >table>tbody>tr').click(function(){
            $(this).toggleClass('trSelected');
        });
        $('#user_count').empty().html("{$pager->totalRows}");
    });
    function delfun(obj) {
        // 删除按钮
        layer.confirm('确认删除？', {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data: {id : $(obj).attr('data-id')},
                dataType: 'json',
                success: function (data) {
                    layer.closeAll();
                    if (data.status == 1) {
                        $(obj).parent().parent().parent().remove();
                    } else {
                        layer.alert(data.msg, {icon: 2});
                    }
                }
            })
        }, function () {
        });
    }

    $('.setPlotter').off().on('click',function () {
        var url = $(this).data('href');
        layer.open({
            type: 2,
            title: '设置策划师信息',
            shadeClose: true,
            shade: 0.8,
            area: ['580px', '600px'],
            content: url
        });
    })

    $('.autoPlotter').off().on('click',function () {
            var url = $(this).data('href');
            $.ajax({
                url:url,
                dataType:'json',
                success:function (ret) {
                    if(ret.status == 1){
                        layer.msg('自动分配成功',{time: 2000}, function(){
                            location.href = "{:U('Admin/Married/order_index')}";
                        });
                    }else{
                        layer.msg(ret.msg, {time: 2000},function(){
                            //do something
                        });
                    }
                }
            })
        })

    function closeIfream() {
        layer.closeAll();
        location.href = "{:U('Admin/Married/order_index')}";
    }


</script>